const express = require('express');
const cors = require('cors');
const pageRoutes = require('./routes/pageRoutes');
const userRoutes = require('./routes/userRoutes');
const morgan = require('morgan');

const app = express();

app.use(cors());
app.use(express.json());
app.use(morgan('dev'));

// 注册路由
app.use('/api/page', pageRoutes);
app.use('/api/user', userRoutes);

module.exports = app; 